<template>
	<view class="tagWrap" :style="{ 'background': checkDengji().bgColor }">
		<image class="iconZuanshi" :src="checkDengji().icon" mode=""></image>
		<text class="tagName" :style="{ 'color': checkDengji().color }">{{ props?.partnerLevel?.name }}</text>
	</view>
</template>

<script setup lang="ts">
import { ref } from 'vue';
import NavBar from '@/components/navBar.vue';
const httpUrl = getApp().globalData.baseUrl+'/app/file/viewFile?fileId='
const props = defineProps({
	partnerLevel: {
		type: Object
	}
});

const checkDengji = () => {
	if (props?.partnerLevel?.value == 'LEVEL_1') {
		return {
			bgColor:'linear-gradient( 90deg, #EAF9FD 0%, #93CFF3 100%)',
			color:'#3D6B98',
			icon: '../../../static/img/homeServer/icon_diamond.png'
		}
	} else if (props?.partnerLevel?.value == 'LEVEL_2') {
		return {
			bgColor:'linear-gradient( 90deg, #FDF5D1 0%, #E4A543 100%)',
			color:'#E38E34',
			icon: '../../../static/img/homeServer/icon_zhongji.png'
		}
	} else if (props?.partnerLevel?.value == 'LEVEL_3') {
		return {
			bgColor:'linear-gradient( 90deg, #F3FBFF 0%, #DCB2E9 100%)',
			color:'#4D3D95',
			icon: '../../../static/img/homeServer/icon_gaoji.png'
		}
		
	}
};
</script>

<style lang="scss" scoped>
.tagWrap {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 184rpx;
	height: 48rpx;
	background: linear-gradient( 90deg, #F8ECB2 0%, #EDD48F 100%);
	border-radius: 12rpx 12rpx 12rpx 12rpx;
	margin-left: 4rpx;
}

.iconZuanshi {
	width: 42rpx;
	height: 42rpx;
}

.tagName {
	font-weight: normal;
	font-size: 24rpx;
	color: #af3900;
	text-align: center;
	font-style: normal;
	text-transform: none;
	margin-left: 4rpx;
}
</style>
